package main

import (
	"fmt"
	"runtime"
	"time"
)

var count int64 = 0

func inc() {
	for i := 0; i < 100000; i++ {
		count++
	}
}

func main() {
	start := time.Now()
	inc()
	inc()
	inc()
	inc()
	inc()
	fmt.Printf("GO协程数：%d\n", runtime.NumGoroutine())
	fmt.Println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

	fmt.Printf("执行时长：%d 微妙:\n", time.Since(start).Microseconds())
	fmt.Printf("GO协程数：%d\n", runtime.NumGoroutine())
	fmt.Printf("count: %d\n", count)
}
